<html>
<head>
<title>Data Binding</title>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<link href="../../book.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
    <h1>Data Binding</h1>
	<div align="left">
		<table border="0" cellpadding="10" cellspacing="0" id="table1" width="800">
			<tr>
				<td valign="top">
				<p class="pnoall">Data binding allows easy linking of UI elements and models 
	so that users can edit or view the data in the model. Traditionally, this is 
	what you need to do to link, say, a text widget to a String property of a 
	model object:</p>
	<ul>
		<li>
		<p class="pnoall">Copy the current value of the model property to the 
		text widget.</li>
		<li>
		<p class="pnoall">Register listeners with the widget and the model 
		object to propagate changes made on one side to the other side.</li>
	</ul>
	<p class="pnoall">The same basic principle applies to binding a list 
	widget's contents to a collection property of a model object.</p>
	<p class="pnoall">Using the data binding framework relieves you from writing 
	and registering listeners yourself, and provides a common infrastructure for 
	validation and conversion. It makes it easy to connect data sources to 
	widgets such as text fields, combos, tables and trees, for viewing and 
	editing. In real life scenarios, changes on one side are not always 
	propagated to the other side right away - changes need to be validated, 
	values converted, and different update policies followed. The data binding 
	framework covers these more advanced aspects as well. </p></td>
			</tr>
		</table>
	</div>
	      </body>
</html>